home *** CD-ROM | disk | FTP | other *** search
- Path: news.muc.de!hwg!heinz
- Subject: The NewObtainGIRPort myth
- Newsgroups: comp.sys.amiga.programmer
- Organization: Private
- X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
- From: heinz@hwg.muc.de (Heinz Wrobel)
- Message-ID: <heinz.15xc@hwg.muc.de>
- Date: Sat, 3 Feb 96 22:30:19 GMT
-
- For those of you who think they have to use something like
- the NewObtainGIRPort hack:
-
- NewObtainGIRPort is
-
- a) useless, because it is not really fixing things.
- At least the 1.1 code is buggy.
-
- b) the wrong approach, because the application having the
- problem should be fixed. The OS is ok.
-
- You are asking why I am saying that? Let me explain.
-
- ObtainGIRPort() will also do a layer lock. This is unfortunately
- not mentioned in the autodocs. But it is described that you may not
- cache that RastPort:
-
- This function must be called EACH time a hook routine needing
- to perform gadget rendering is called, and must be accompanied
- by a corresponding call to ReleaseGIRPort().
-
- This is obviously a strong indicator that you
-
- a) may only use simple rendering calls (That's what the
- function is for: rendering)
- b) may not give control back to Intuition either by leaving the
- context or by calling Intuition functions before you called
- ReleaseGIRPort().
-
- Once you know that ObtainGIRPort() does a layer lock, you can look
- up the LockLayer() autodoc, too:
-
- Further Note: while you hold the lock on a layer, Intuition will block
- on operations such as windowsizing, dragging, menus, and depth
- arranging windows in this layer's screen. It is recommended that
- YOU do not make Intuition function calls while the layer is locked.
-
- So everyone who is currently using a hack like NewObtainGIRPort
- should better complain to the authors of the application that
- causes the problems in the first place.
-
- --
- Heinz Wrobel Private Mail: heinz@hwg.muc.de
- My private FAX: +49 89 850 51 25, I prefer email
-